﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CEQuery
{
    public partial class DQE : Form
    {
        public List<CETable> CETables { get; set; }
        public string Query { get; private set; }
        public DQE()
        {
            InitializeComponent();
            
        }

        private void DQE_Load(object sender, EventArgs e)
        {
            try
            {
                this.sqlDsgn.DesignerColse += new DesignerColseEventHandler(sqlDsgn_DesignerColse);
                this.sqlDsgn.CETables = CETables;
                this.sqlDsgn.LoadDesigner();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        void sqlDsgn_DesignerColse(object sender, DesignerColseEventArgs e)
        {
            Query = e.Query;
            btnHiddenOK.PerformClick();
        }
    }
}
